import { enums, EnumItem } from "./enums"
export const dataSource: EnumItem[] = [
    { type: "dataSource", label: "用户输入", value: "USR:INPUT", group: "U" },
    {
        type: "dataSource", label: "用户选择", value: "USR:SELECT", group: "U",
        children: [
            { label: "数据表", value: "data-table", type: "" },
            { label: "数据字典", value: "data-dict", type: "" },
        ],
    },
    {
        type: "dataSource", label: "数据构建", value: "DB", group: "S",
        children: [
            { label: "自增主键", value: "auto-increment", type: "" },
            {
                label: "系统时间", value: "CURRENT_TIMESTAMP", type: "", children: [
                    { label: "创建时", value: "1", type: "" },
                    { label: "修改时", value: "2", type: "" },
                ]
            },
        ],
    },
    {
        type: "dataSource", label: "程序构建", value: "SYS", group: "S",
        children: [
            { label: "UUID", value: "uuid", type: "" },
        ],
    }
]
//字段配置的数据源
enums.append(dataSource);


export enum DbSourceMethod {
    DataDict = "data-dict",
    DataTable = "data-table",
  }